<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core">
    <body>
        <h:panelGrid columns="1" style="width: 100%">
            <p:selectBooleanCheckbox/>
            <p:dataGrid var="var" value="#{templateBackingBean.templates}"  style="width: 100%" columns="1">
                <p:column style="background-color: white; width: 100%">
                    <div>
                        <p:selectBooleanCheckbox  value="#{var.selected}"/>
                        <p:commandLink value="#{var.name}" actionListener="#{templateBackingBean.onTemplateSelected(var)}" update="@form"/>
                    </div>
                </p:column>  
            </p:dataGrid>
        </h:panelGrid>
    </body>
</html>